package com.chenfeng.gamshopping.controller;

import com.chenfeng.gamshopping.dataobject.UserInfo;
import com.chenfeng.gamshopping.responsitory.UserInfoResponsitory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


/**
 * Created by wrcsh on 2018/8/15.
 */
@RestController
public class UserController {
    @Autowired
    UserInfoResponsitory userInfoResponsitory;
    @PostMapping("/register")
    public String userRegister(String telephone,String password){
        Map<String, Object> param = new HashMap<String, Object>();
        UserInfo userInfo =  userInfoResponsitory.getUserInfoByTelephone(telephone);
        if(userInfo==null) {

        } else {
            UserInfo userinfo = new UserInfo();
            userinfo.setTelephone(telephone);
            userinfo.setPassword(password);

        }
        return null;
    }
}
